<template>
	<view>
		<ItemList head>
			<template #title>
				<text class="form-name">OSG Resources Request Form</text>
			</template>
			<template #topic>
				<text>! Please make sure the format of all your responses is correct, otherwise, we will ask you to
					resubmit your request (please don't waste your time).!</text>
			</template>
		</ItemList>

		<template>
			<ItemList>
				<template #title>
					Email
				</template>
				<template #topic>
					<uni-data-select v-model="form.email" :localdata="emailOption"
						placeholder='select'></uni-data-select>
				</template>
			</ItemList>
			<ItemList>
				<template #title>
					Please write your full name and school in the format of (FirstName LastName School GradYear)
					Example: John Doe NYU 2024
				</template>
				<template #topic>
					<u--input
						:value="`${userDetail.real_name} ${userDetail.school?userDetail.school:''} ${userDetail.year?userDetail.year:''}`"
						border="bottom" disabled></u--input>

				</template>
			</ItemList>
			<ItemList>
				<template #title>
					Who's your lead mentor?
				</template>
				<template #topic>
					<uni-combox style="border-bottom: solid 1px #DCDFE6;" :candidates="testlist" :border="false" placeholder="select your lead mentor" v-model="form.describe_type"></uni-combox>
					<!-- <u-radio-group v-model="form.describe_type" placement="column">
						<u-radio :customStyle="{marginBottom: '17px'}" v-for="(item, index) in mentorlist" :key="index"
							:label="item.name" :name="item.name">
						</u-radio>
						<u-radio :customStyle="{marginBottom: '17px'}" :disabled='false'>
							<u--input placeholder="请输入内容" border="bottom" clearable></u--input>
						</u-radio>
					</u-radio-group> -->
				</template>
			</ItemList>
			<ItemList>
				<template #title>
					What are you requesting?
				</template>
				<template #topic>
					<p class="p">PS:</p>
					<p class="p">- Please make sure you choose the right one because some firms have both OT and
						Prerecorded Video Interviews,
						and you don't want to receive the wrong one.</p>
					<p class="p">-如果你本来想要Hirevue,却选OT了,我们只会给你发选择的资源类型（如果错过DDL，请自己负责）</p>
					<p class="p">The Definition of "Question Bank forInterview": You will interview with a real person
						online or on-site,
						not with your camera. For this type of request, please contact your LM.</p>
					<u-radio-group v-model="form.request_for" placement="column">
						<u-radio :customStyle="{marginBottom: '17px'}" v-for="(item, index) in list" :key="index"
							:label="item.name" :name="index">
						</u-radio>
					</u-radio-group>
				</template>
			</ItemList>
			<ItemList>
				<template #title>
					Location, CompanyName, JobTitle地点，公司名称，职位
				</template>
				<template #topic>
					<p class="p">PS:</p>
					<p class="p">! If you are requesting for multiple roles, please please do me a favor to submit
						separate request
						(Otherwise. I will ask you resubmit your request-如果出现这种情况，我们会直接忽略该request!</p>
					<p class="p">- Location: US (+ State) I HK (China)I UKI China Mainland- Company: Please spell the
						full name JobTitle:
						Please write down the full job title!</p>
					<p class="p">!Don't be lazy, please make sure yourformat is correct!
						-仍然还是有人连company name或者division都不放上去(到时候再填一次，不仍然耽误的是你自己的时间嘛?!)</p>
					<p class="p"> Example:US NYC, JPMorgan, 2024 Corporate & Investment Bank Markets Summer Analyst
						Program</p>
					<u--input v-model="form.describe_info" border="bottom"></u--input>
				</template>
			</ItemList>
			<ItemList>
				<template #title>
					Is this position on OSG's Job MegaSheet?
				</template>
				<template #topic>
					<u-radio-group v-model="form.is_osg_job" placement="column">
						<u-radio :customStyle="{marginBottom: '17px'}" v-for="(item, index) in yn" :key="index"
							:label="item.name" :name="item.name">
						</u-radio>
					</u-radio-group>
				</template>
			</ItemList>
			<ItemList>
				<template #title>
					How many days before your due time?
				</template>
				<template #topic>
					<p class="p">Ex:</p>
					<p class="p">- If Today -> 0 Days</p>
					<p class="p">- If Tomorrow -> 1 Days</p>
					<p class="p">- If you don't know -> NA</p>
					<p class="p">..........</p>
					<p class="p"> 这个问题的回答和你什么时候将收到resources没有关系</p>
					<u--input v-model="form.due_time" border="bottom"></u--input>
				</template>
			</ItemList>
			<ItemList>
				<template #topic>
					<p class="p">1. If you chose "Pre-recorded VideoInterview" Above:<br />->Please put your hirevue
						link</p>
					<p class="p">PS-How to send the right hirevuelink:!<br />(Morgan Stanley as an example)<br />
						1. Login your Morgan Stanleyapplication portal<br />
						2. Click the program you applied, and you will see "Start Interview" botten<br />
						3. A Pre-recorded Video Interviewwindow will pop up<br />
						4. Copy the URL and close the window.Don't click "Continue".</p>
					<p class="p">2. If you chose "OT" Above:Please put your OT link+ Application Portal Account (Email+
						Password)</p>
					<p class="p">PS-How to send the right OT link:!<br />
						1. Open your original email receivedfrom the firm<br />
						2. Find your OT access link<br />
						3. Copy_that link<br />
						4. Write down your login information</p>
					<p class="p">3. If it is not applicable for either, fill "N/A"</p>
					<u--input v-model="form.link_info" border="bottom"></u--input>
				</template>
			</ItemList>
			<ItemList>
				<template #title>
					Please Upload Your VI/OT Invitation Email
				</template>
				<template #topic>
					<uni-file-picker v-model="form.file_id" file-mediatype="all">
						<button>选择文件</button>
					</uni-file-picker>
				</template>
			</ItemList>
			<ItemList>
				<template #title>
					OSG Resource Team有话说
				</template>
				<template #topic>
					<p class="p-c">
						其实我们真的不想把这个form设置得如此之复杂,但是每天需要处理的requests真的非常的多。
						数百家公司，且每一个公司的position的机制都不一样。如果出现填的有问题的request,
						需要调查和处理的时间是一个regularrequest的数倍之多。我们对每一个request负责,
						不想让你们无法及时收到甚至收到错误的resources。因此,希望你们可以理解。
					</p>
					<p class="p-c"> 此外,如果站在Banker的角度,我们也想和你们说:准备"Strengths"这个问题的response时，相信你们很多人都会写"Detail-Oriented"。
						也许你们在回答面试的时候说的非常的轻松,但是就算你最后拿到了offer,这个品质将会很大程度上决定你的return offer。而这个品质真的需要长时间的培养。 </p>
					<p class="p-c">
						最后祝愿你们早日拿到offer，成功上岸！</p>
				</template>
			</ItemList>

		</template>
	</view>
</template>

<script>
	import ItemList from '@/components/basicListItem/formCardItem/formCardItem.vue'
	export default {
		components: {
			ItemList
		},
		computed: {
			userDetail() {
				return this.$store.state.userDetail;
			},
			userList() {
				return this.$store.state.userList;
			}
		},
		data() {
			return {
				emailOption: [],
				userOption: [],
				form: {
					due_time: 0,
					describe_info: "",
					is_osg_job: "",
					link_info: "",
					email: "",
					request_for: 0,
					file_id: "",
					mot_id: 0
				},
				testlist:['Grace-Finance','Sarah-Finance','Stafford-Finance','Bob-Finance','Jacky-Finance'],
				mentorlist: [{
					name: 'Grace-Finance',
					disabled: false,
				}, {
					name: 'Sarah-Finance',
					disabled: false,
				}, {
					name: 'Stafford-Finance',
					disabled: false,
				}, {
					name: 'Bob-Finance',
					disabled: false,
				}, {
					name: 'Jacky-Finance',
					disabled: false,
				}, {
					name: 'Tracy-Finance',
					disabled: false,
				}, {
					name: 'DG/Fred/Jess-Consulting',
					disabled: false,
				}, {
					name: 'Cole-Finance',
					disabled: false,
				}, {
					name: 'Bobby-Finance',
					disabled: false,
				}, {
					name: 'Eleanor-Finance',
					disabled: false,
				}, {
					name: 'Celine-Finance',
					disabled: false,
				} ],
				list: [{
						name: 'OT',
						disabled: false
					},
					{
						name: 'Pre-Recorded Interview',
						disabled: false
					},
				],
				yn: [{
						name: 'Yes',
						disabled: false
					},
					{
						name: 'No',
						disabled: false
					},
				],
			}
		},
		onLoad() {},

		methods: {
			// 获取上传状态
			select(e) {
				console.log('选择文件：', e)
			},
			// 获取上传进度
			progress(e) {
				console.log('上传进度：', e)
			},

			// 上传成功
			success(e) {
				console.log('上传成功')
			},

			// 上传失败
			fail(e) {
				console.log('上传失败：', e)
			},
			upload() {
				console.log(this.$refs.files);
				// this.$refs.files.upload()
			},
			getOption() {
				this.emailOption = Object.entries(this.userDetail.emails).reduce((acc, [key, value]) => {
					acc.push({
						value: value,
						text: value ? value : '---'
					});
					return acc;
				}, []);
				this.userOption = Object.entries(this.userList).reduce((acc, [key, value]) => {
					acc.push({
						value: this.userList[key],
						text: value.real_name
					});
					return acc;
				}, []);
			}
		}
	}
</script>

<style>
	page {
		background: #f3eafb;
	}

	.form-name {
		font-size: 70rpx;
		font-weight: 600;
	}

	.btn {
		width: 150rpx;
		float: left;
	}

	.p {
		margin-bottom: 20rpx;
		font-style: italic;
		text-decoration: underline;

	}
	.p-c{
		margin-bottom: 20rpx;
		
	}
</style>